#include <stdio.h>
#include <stdlib.h>
#include "log.h"

int main()
{
	int arg = 1209;
	uint8_t buf[128];

	memset(buf, 0XAA, sizeof(buf));

	LOG_INIT();
	printf("log inited\n");

	// 注册日志输出到控制台
	LOG_SUBSCRIBE(log_console_output, LOG_TRACE_LEVEL);
	printf("log subscribe console\n");

	// 注册日志输出到文件
	LOG_SUBSCRIBE(log_file_output, LOG_TRACE_LEVEL);
	printf("log subscribe file\n");

	// LOG_SUBSCRIBE(log_console_logger, LOG_DEBUG_LEVEL);
//	LOG_SUBSCRIBE(log_console_logger, LOG_INFO_LEVEL);
//	LOG_SUBSCRIBE(log_console_logger, LOG_WARNING_LEVEL);
//	LOG_SUBSCRIBE(log_console_logger, LOG_ERROR_LEVEL);
//	LOG_SUBSCRIBE(log_console_logger, LOG_CRITICAL_LEVEL);

	// 原始输出
	LOG(LOG_TRACE_LEVEL, "this is message ! \n");

	// 带TAG的输出
	LOGF("this is message, arg:%d !", arg);
	LOGE("this is message, arg:%d !", arg);
	LOGW("this is message, arg:%d !", arg);
	LOGI("this is message, arg:%d !", arg);
	LOGD("this is message, arg:%d !", arg);
	LOGT("this is message, arg:%d !", arg);

	while (1)
	{
		LOGE("/vendor/bin/docker exec con0 /bin/am start com.tencent.letsgo/com.epicgames.ue4.GameActivityExt \
		/vendor/bin/docker exec con0 /bin/am start com.tencent.letsgo/com.epicgames.ue4.GameActivityExt/vendor/bin/docker \
		exec con0 /bin/am start com.tencent.letsgo/com.epicgames.ue4.GameActivityExt/vendor/bin/docker exec con0 /bin/am \
		start com.tencent.letsgo/com.epicgames.ue4.GameActivityExt/vendor/bin/docker exec con0 /bin/am start com.tencent.letsgo/com.epicgames.ue4.GameActivityExt/vendor \
		/bin/docker exec con0 /bin/am start com.tencent.letsgo/com.epicgames.ue4.GameActivityExt/vendor/bin/docker exec con0 /bin/am start com.tencent.letsgo/com.epicgames \
		.ue4.GameActivityExt/vendor/bin/docker exec con0 /bin/am start com.tencent.letsgo/com.epicgames.ue4.GameActivityExt/vendor/bin/docker exec con0 /bin/am start com \
		.tencent.letsgo/com.epicgames.ue4.GameActivityExt/vendor/bin/docker exec con0 /bin/am start com.tencent.letsgo/com.epicgames.ue4.GameActivityExt/vendor/bin/docker \
		exec con0 /bin/am start com.tencent.letsgo/com.epicgames.ue4.GameActivityExt/vendor/bin/docker exec con0 /bin/am start com.tencent.letsgo/com.epicgames \
		.ue4.GameActivityExt/vendor/bin/docker exec con0 /bin/am start co");

		sleep(1);
	}
	
    
    return 0;
}
